package interview.questions.重建二叉树;

//public class TreeNode {
//
//    int val;
//
//    TreeNode left;
//
//    TreeNode right;
//
//    TreeNode(int x) {
//        val = x;
//    }
//}
//二叉树节点
public class TreeNode {
    private int data;
    TreeNode left;
    TreeNode right;

    TreeNode(int x) {
        data = x;
    }

    public TreeNode() {
    }

    public TreeNode(int data, TreeNode left, TreeNode right) {
        super();
        this.data = data;
        this.left = left;
        this.right = right;
    }

    public int getData() {
        return data;
    }

    public void setData(int data) {
        this.data = data;
    }

    public TreeNode getLeft() {
        return left;
    }

    public void setLeft(TreeNode left) {
        this.left = left;
    }

    public TreeNode getRight() {
        return right;
    }

    public void setRight(TreeNode right) {
        this.right = right;
    }
}
